package com.service.utils;

import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;

import java.net.URI;

/**
 * HttpDelete 使用 body 传递参数
 * @author wuxiaohua
 * @date 2021/8/8 14:47
 **/
public class HttpDeleteWithBody extends HttpEntityEnclosingRequestBase {
    public static final String METHOD_NAME = "DELETE";

    public HttpDeleteWithBody() {
    }

    public HttpDeleteWithBody(URI uri) {
        this.setURI(uri);
    }

    public HttpDeleteWithBody(String uri) {
        this.setURI(URI.create(uri));
    }

    /**
    * 重载获取方法
    **/
    @Override
    public String getMethod() {
        return METHOD_NAME;
    }
}
